<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

</body>
<script>
    function each( arr, callback ) {
        for ( var i = 0; i < arr.length; i++ ) {
            if ( callback.call( arr[ i ], arr[ i ], i) ===false ) break;
        }
        return arr;
    }
    var a = each( [ 1, 2, 3 ], function () {
        return false;
    })
    console.log(a);
</script>
</html>